/**
 * 此文件依赖log.js,请在页面中先引入log.js
 */
var LocalStorage = {
	isDebug: true, //是否为调试
	keys: {
		First_Open: "First_Open",
		Auth_Token: "Auth_Token",
		BASEAPI: "BASEAPI",
		User_Id: "User_Id",
		User_Info: "User_Info",
		User_Name:"User_Name",
	},
	//巡检坐标点时间记录的时间
	locations:{
		free:{
			ID:"Inspec_ID_free",
			Name:"Name_free",
			InspecLocations:"InspecLocations_free",//巡检坐标数组
		},
		platform:{
			ID:"Inspec_ID",
			Name:"Name",
			InspecLocations:"InspecLocations",//巡检坐标数组
		}
	}, 
	
	setItem: function(itemKey, itemValue) {
		plus.storage.setItem(itemKey, itemValue + "");
		aUtil.aLog.deb(this.isDebug, "Add LocalStorage is [" + itemKey + " : " + plus.storage.getItem(itemKey) + "]");
	},
	getItem: function(itemKey) {
		var itemValue = plus.storage.getItem(itemKey);
		aUtil.aLog.deb(this.isDebug, "LocalStorage[" + itemKey + "] : " + itemValue);
		return itemValue;
	},
	clearAll: function() {
		aUtil.aLog.deb(this.isDebug, "remove all");
		plus.storage.clear();
	},
	removeItem: function(itemKey) {
		aUtil.aLog.deb(this.isDebug, "remove [" + itemKey + "] ");
		plus.storage.removeItem(itemKey);
		plus.storage.setItem(LocalStorage.keys.First_Open, "true");
	}
}
